﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using WinnerCMS.Common;
using WinnerCMS.BLL;
using WinnerCMS.Model;
using WinnerCMS.Model.Attribute;

#endregion

namespace WinnerCMS.WebUI.Admin.FriendLink
{
    [Access("259002")]
    public partial class FriendLinkCheck : WebFactory.PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.GV_List.EmptyDataTemplate = GetTemplate(this);

                new FriendLinkManage().BindList(this.GV_List);
            }
        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            var list = new List<WinnerCMS.Model.FriendLink>();

            var model = new WinnerCMS.Model.FriendLink();
            model.Id = 1;
            model.Title = new Uri(this.txtURL.Text).Host;
            model.Url = this.txtURL.Text;

            list.Add(model);

            this.GV_List.DataSource = list;
            this.GV_List.DataBind();
        }
    }
}